public class Demo {
    public static void main(String[] args) {
        Zi z = new Zi();
        System.out.println(z.age);
        z.method();

        Fu f = new Fu();
        System.out.println(f.age);
        f.method();
    }
}
 class Fu {
    int age = 30;
    public Fu(){
        System.out.println("The non-parameter constructor of class Fu has been called.");
    }
    public Fu(int age){
        this.age = age;
        System.out.println("The constructor of class Fu has been called.");
    }
    public static void method(){
        System.out.println("The method of class Fu has been called.");
    }
}
 class Zi extends Fu {

    //  int age = 20;
    public Zi(){
        System.out.println("The non-parameter constructor of class Zi has been called.");
    }
    public Zi(int age){
        System.out.println("The constructor of class Zi has been called.");
    }
//    public static void method(){
//        System.out.println("The method of class Zi has been called.");
//    }
}
